<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j">

<ui:composition template="/templates/principal_template.xhtml">
	<ui:define name="pageTitle">Login - jMed Systems</ui:define>
	<ui:define name="pageScrips"></ui:define>
	<ui:define name="pageCss"></ui:define>

	<ui:define name="imgTopContent"></ui:define>
	<ui:define name="imgTopLabelContent"></ui:define>
	<ui:define name="label_page_content"></ui:define>
	<p></p>

	<ui:define name="imgTopLabelContent">
		<p>Inclusão de Hospital</p>
	</ui:define>

	<ui:define name="contentMain">
		<h:form id="form-alter-medicamento">
			<rich:panel>
				<h:panelGrid columns="2">

					<h:outputText value="CNPJ" />
					<h:inputText value="#{cadastroControl.hospital.cnpj}" />

					<h:outputText value="Nome Fantasia" />
					<h:inputText value="#{cadastroControl.hospital.nomeFantasia}" required="true" requiredMessage="O nome fantasia é obrigatório"/>

					<h:outputText value="Razão Social" />
					<h:inputText value="#{cadastroControl.hospital.razaoSocial}" required="true" requiredMessage="A razão social é obrigatória."/>
					
					<h:outputText value="Situação" />
					<h:selectOneRadio required="true" requiredMessage="A situação é obrigatória."
						value="#{cadastroControl.hospital.situacao}">
						<f:selectItem itemLabel="Ativo" itemValue="A" />
						<f:selectItem itemLabel="Inativo" itemValue="I" />
					</h:selectOneRadio>

					<h:commandButton
						action="#{cadastroControl.alterarCadastroHospital()}"
						value="Salvar" />

					<h:commandButton action="/pages/hospital/hospitalBusca.xhtml"
						value="Cancelar" immediate="true"/>

				</h:panelGrid>
			</rich:panel>

		</h:form>
	</ui:define>
</ui:composition>

</html>